import allure

"""
allure.feature: 类级别
allure.story：方法级别，测试用例级别
allure.step：测试步骤
"""
import pytest
import allure


@allure.feature("登录")
class TestLogin():
    @allure.story("登录成功")
    def test_login_success(self):
        print("登录成功")

    @allure.story("密码错误")
    def test_login_failure(self):
        with allure.step("输入用户名"):
            print("输入用户名")
        with allure.step("输入密码"):
            print("输入密码")
        with allure.step("点击登录"):
            print("点击登录")
        with allure.step("登录失败"):
            assert "1" == 1
            print("登录失败")

    @allure.story("用户名密码错误")
    def test_login_failure_a(self):
        print("用户名或者密码错误，登录失败")


# pytest [测试文件] --alluredir=allure
# allure generate ./allure/ -o ./reports --clean







